# -*- coding: utf-8 -*-
"""
Created on Tue Feb 19 14:55:43 2013

@author: aponteeduardo@gmail.com
Copyright Eduardo Aponte 2013.
"""

# Itereates over the binders

from mex_binder import binder_py

mx_close_eyelink_system = binder_py('mx_close_eyelink_system')
mx_close_eyelink_system.mx_c.headers = ['<eyelink.h>','"mex.h"']
mx_close_eyelink_system.mx_c.code = '''

void _main( void )
{
    close_eyelink_system(); 
    return;
}

void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
{

    /* Verify input arguments. */
    if(nrhs > 0 ) {
        mexErrMsgTxt("Incorrect number of inputs");
    } else if(nlhs > 0) {
        mexErrMsgTxt("Too many output arguments.");
    }
    
    _main();

    return;
    
}


'''

mx_close_eyelink_system.mx_c.mdoc = \
'''function mx_close_eyelink_system( )
%MX_CLOSE_EYELINK_SYSTEM Resets the EyeLink library, releases the system 
% resources used by the millisecond clock.
%
% Remarks:
% MUST DO BEFORE EXITING.
%
'''
mx_close_eyelink_system.write_c()
mx_close_eyelink_system.write_m()
mx_close_eyelink_system.compile()
mx_close_eyelink_system.write_sh()

